//
//  SettingTableViewCell.swift
//  AreaChainblock
//
//  Created by 赵佟越 on 2018/9/17.
//  Copyright © 2018年 zhaotongyue. All rights reserved.
//

import UIKit
import HexColors

class SettingTableViewCell: UITableViewCell

{
    var titleLab:UILabel?
    var mybackView:UIView?
    var coverImageView:UIImageView?
    var desLab:UILabel?
    var priceLab:UILabel?
    var LineView = UIView(frame: CGRect(x: 10, y: 39, width: kScreenWidth - 40, height: 1))
    required init?(coder aDecoder: NSCoder) {
    super.init(coder: aDecoder)
}
    
override var frame:CGRect{
        didSet {
            var newFrame = frame
            newFrame.origin.x += 20/2
            newFrame.size.width -= 20
            newFrame.origin.y += 0
            newFrame.size.height -= 0
            super.frame = newFrame
        }
}


override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
    
    super.init(style: style, reuseIdentifier: reuseIdentifier)
    
    self.lauoutUI()

}

func lauoutUI()  {
//    self.backgroundColor = UIColor.clear
    
    LineView.backgroundColor = UIColor.clear
    self.backgroundColor = UIColor.clear
    titleLab = UILabel(frame:CGRect(x:10,y:5,width:kScreenWidth - 50,height:40))
    titleLab?.textColor = UIColor.white
    self.addSubview(titleLab!)
    titleLab?.font = UIFont.systemFont(ofSize: 16)
    priceLab = UILabel()
    priceLab?.textAlignment = .right
    priceLab?.font = UIFont.systemFont(ofSize: 16)
    self.addSubview(priceLab!)
    priceLab?.snp.makeConstraints({ (make) in
        make.right.equalTo(self).offset(-35)
        make.centerY.equalTo(self)
        make.size.equalTo(CGSize(width: 200, height: 30))
    })
    priceLab?.textColor =  UIColor("909090")
    
    
    
    self.addSubview(LineView)
}








override func awakeFromNib() {
    
    super.awakeFromNib()
    
    // Initialization code
    
}

override func setSelected(_ selected: Bool, animated: Bool) {
    
    super.setSelected(selected, animated: animated)
    
    
    
    // Configure the view for the selected state
    
}

}
